<?php
/* -----------------------------------------------------------------
* 	ID:						$Id: cseo_get_content_child.inc.php 2 2011-02-17 13:35:25Z akausch $
* 	Letzter Stand:			$Revision: 2 $
* 	zuletzt geändert von: 	$Author: akausch $
* 	Datum:					$Date: 2011-02-17 14:35:25 +0100 (Do, 17. Feb 2011) $
*
* 	commerce:SEO by Webdesign Erfurt
* 	http://www.commerce-seo.de
*
* 	Copyright (c) since 2010 commerce:SEO
* ------------------------------------------------------------------
* 	based on:
* 	(c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
* 	(c) 2002-2003 osCommerce - www.oscommerce.com
* 	(c) 2003     nextcommerce - www.nextcommerce.org
* 	(c) 2005     xt:Commerce - www.xt-commerce.com
*
* 	Released under the GNU General Public License
* --------------------------------------------------------------- */

function cseo_get_content_child($content_id) {
	$data = xtDBquery("SELECT
								content_title,
								content_group,
								content_out_link,
								content_link_target,
								content_link_type
							FROM
								".TABLE_CONTENT_MANAGER."
							WHERE
								parent_id = '".(int)$content_id."'
							AND
								languages_id = '".(int)$_SESSION['languages_id']."'
							ORDER BY
								sort_order ");

	if($data->_numOfRows) {
		while(!$data->EOF) {
			if($data->fields['content_out_link']) {
				$content_child[] = array('content_title' => $data->fields['content_title'],
										'content_out_link' => $data->fields['content_out_link'],
										'content_link_target' => $data->fields['content_link_target'],
										'content_link_type' => $data->fields['content_link_type']);
			} else {
				$content_child[] = array('content_group' => $data->fields['content_group'],
										'content_title' => $data->fields['content_title']);
			}
			$data->MoveNext();
		}
		return $content_child;
	} else
		return false;
}

?>